unit NovinAfzarNT_TLB;

// ************************************************************************ //
// WARNING                                                                    
// -------                                                                    
// The types declared in this file were generated from data read from a       
// Type Library. If this type library is explicitly or indirectly (via        
// another type library referring to this type library) re-imported, or the   
// 'Refresh' command of the Type Library Editor activated while editing the   
// Type Library, the contents of this file will be regenerated and all        
// manual modifications will be lost.                                         
// ************************************************************************ //

// $Rev: 52393 $
// File generated on 29/03/2015 12:31:24 ب.ظ from Type Library described below.

// ************************************************************************  //
// Type Lib: D:\Projects\Novin\NHL 9.8.0.0\Library-ActiveX\XNovinShell.dll (1)
// LIBID: {5199A4FE-828C-4939-B5C6-23968CA6D5BB}
// LCID: 0
// Helpfile: 
// HelpString: 
// DepndLst: 
//   (1) v2.0 stdole, (C:\Windows\SysWOW64\stdole2.tlb)
// SYS_KIND: SYS_WIN32
// ************************************************************************ //
{$TYPEDADDRESS OFF} // Unit must be compiled without type-checked pointers. 
{$WARN SYMBOL_PLATFORM OFF}
{$WRITEABLECONST ON}
{$VARPROPSETTER ON}
{$ALIGN 4}

interface

uses Winapi.Windows, System.Classes, System.Variants, System.Win.StdVCL, Vcl.Graphics, Vcl.OleServer, Winapi.ActiveX;
  

// *********************************************************************//
// GUIDS declared in the TypeLibrary. Following prefixes are used:        
//   Type Libraries     : LIBID_xxxx                                      
//   CoClasses          : CLASS_xxxx                                      
//   DISPInterfaces     : DIID_xxxx                                       
//   Non-DISP interfaces: IID_xxxx                                        
// *********************************************************************//
const
  // TypeLibrary Major and minor versions
  NovinAfzarNTMajorVersion = 9;
  NovinAfzarNTMinorVersion = 6;

  LIBID_NovinAfzarNT: TGUID = '{5199A4FE-828C-4939-B5C6-23968CA6D5BB}';

  IID__WSshell: TGUID = '{A6CD0FF1-5A52-4C3D-B575-1D91834B4F98}';
  CLASS_WSshell: TGUID = '{0562B868-4A53-419B-B41B-66648AEAA978}';
type

// *********************************************************************//
// Forward declaration of types defined in TypeLibrary                    
// *********************************************************************//
  _WSshell = interface;
  _WSshellDisp = dispinterface;

// *********************************************************************//
// Declaration of CoClasses defined in Type Library                       
// (NOTE: Here we map each CoClass to its Default Interface)              
// *********************************************************************//
  WSshell = _WSshell;


// *********************************************************************//
// Interface: _WSshell
// Flags:     (4416) Dual OleAutomation Dispatchable
// GUID:      {A6CD0FF1-5A52-4C3D-B575-1D91834B4F98}
// *********************************************************************//
  _WSshell = interface(IDispatch)
    ['{A6CD0FF1-5A52-4C3D-B575-1D91834B4F98}']
    procedure GetFirstDevice; safecall;
    procedure GetNextDevice; safecall;
    function GetDeviceCount: Integer; safecall;
    procedure SelectDevice(const SerialNo: WideString); safecall;
    procedure GetDeviceReady; safecall;
    procedure GetDeviceStatus; safecall;
    function GetSerial: WideString; safecall;
    function GetVersion: WideString; safecall;
    function GetMemorySize: Integer; safecall;
    function GetMemorySizeEx: WideString; safecall;
    function GetDataBlockStr(const sVID: WideString; const sPWD: WideString; Start: Integer; 
                             DataLen: Integer): WideString; safecall;
    procedure SetDataBlockStr(const sVID: WideString; const sPWD: WideString; Start: Integer; 
                              DataLen: Integer; const DataBlockStr: WideString; 
                              const defChar: WideString); safecall;
    function GetDataChar(const sVID: WideString; const sPWD: WideString; Index: Integer): WideString; safecall;
    procedure SetDataChar(const sVID: WideString; const sPWD: WideString; Index: Integer; 
                          const DataChar: WideString); safecall;
    function GetDataByte(const sVID: WideString; const sPWD: WideString; Address: Integer): Byte; safecall;
    procedure SetDataByte(const sVID: WideString; const sPWD: WideString; Address: Integer; 
                          DataByte: Byte); safecall;
    function GetDataHEXBlock(const sVID: WideString; const sPWD: WideString; Start: Integer; 
                             DataLen: Integer): WideString; safecall;
    procedure SetDataHEXBlock(const sVID: WideString; const sPWD: WideString; Start: Integer; 
                              DataLen: Integer; const DataHEXBlock: WideString); safecall;
    function GetDecryption(const sVID: WideString; const sPWD: WideString; 
                           const sCData: WideString; Repetition: Integer): WideString; safecall;
    function GetEncryption(const sVID: WideString; const sPWD: WideString; 
                           const sPData: WideString; Repetition: Integer): WideString; safecall;
    function GetPID(const sVID: WideString; const sPWD: WideString): WideString; safecall;
    function GetNET: Integer; safecall;
    function GetTimerCounter: Integer; safecall;
    procedure Activate(const Code: WideString); safecall;
    procedure DecreaseCounter; safecall;
    function ConvStringToDelimiteredString(const strCnv: WideString; ALen: Integer; 
                                           const DSep: WideString): WideString; safecall;
    function ConvDelimiteredStringToString(const strDCnv: WideString; ALen: Integer; 
                                           const DSep: WideString): WideString; safecall;
    function ConvStringToHEXString(const strCnv: WideString; ALen: Integer; const HSep: WideString): WideString; safecall;
    function ConvHEXStringToString(const strHCnv: WideString; ALen: Integer): WideString; safecall;
    function ConvDelimiteredStringToHEXString(const strDCnv: WideString; ALen: Integer; 
                                              const DSep: WideString; const HSep: WideString): WideString; safecall;
    function ConvHEXStringToDelimiteredString(const strHCnv: WideString; ALen: Integer; 
                                              const DSep: WideString): WideString; safecall;
    function Get_ErrNo: Integer; safecall;
    function Get_ErrDescr: WideString; safecall;
    function Get_ErrDescrFA: WideString; safecall;
    function Get_DeviceName: WideString; safecall;
    function Get_DeviceVer: WideString; safecall;
    function Get_DeviceSerial: WideString; safecall;
    function Get_SelectedName: WideString; safecall;
    function Get_SelectedVer: WideString; safecall;
    function Get_SelectedSerial: WideString; safecall;
    procedure Login(const Username: WideString; const Password: WideString); safecall;
    procedure Logout; safecall;
    function Get_Host: WideString; safecall;
    procedure Set_Host(const Value: WideString); safecall;
    function Get_Port: Integer; safecall;
    procedure Set_Port(Value: Integer); safecall;
    procedure init; safecall;
    procedure Set_PSK(const Param1: WideString); safecall;
    property ErrNo: Integer read Get_ErrNo;
    property ErrDescr: WideString read Get_ErrDescr;
    property ErrDescrFA: WideString read Get_ErrDescrFA;
    property DeviceName: WideString read Get_DeviceName;
    property DeviceVer: WideString read Get_DeviceVer;
    property DeviceSerial: WideString read Get_DeviceSerial;
    property SelectedName: WideString read Get_SelectedName;
    property SelectedVer: WideString read Get_SelectedVer;
    property SelectedSerial: WideString read Get_SelectedSerial;
    property Host: WideString read Get_Host write Set_Host;
    property Port: Integer read Get_Port write Set_Port;
    property PSK: WideString write Set_PSK;
  end;

// *********************************************************************//
// DispIntf:  _WSshellDisp
// Flags:     (4416) Dual OleAutomation Dispatchable
// GUID:      {A6CD0FF1-5A52-4C3D-B575-1D91834B4F98}
// *********************************************************************//
  _WSshellDisp = dispinterface
    ['{A6CD0FF1-5A52-4C3D-B575-1D91834B4F98}']
    procedure GetFirstDevice; dispid 226;
    procedure GetNextDevice; dispid 227;
    function GetDeviceCount: Integer; dispid 228;
    procedure SelectDevice(const SerialNo: WideString); dispid 229;
    procedure GetDeviceReady; dispid 1610809482;
    procedure GetDeviceStatus; dispid 212;
    function GetSerial: WideString; dispid 1610809480;
    function GetVersion: WideString; dispid 1610809481;
    function GetMemorySize: Integer; dispid 1610809510;
    function GetMemorySizeEx: WideString; dispid 203;
    function GetDataBlockStr(const sVID: WideString; const sPWD: WideString; Start: Integer; 
                             DataLen: Integer): WideString; dispid 1610809484;
    procedure SetDataBlockStr(const sVID: WideString; const sPWD: WideString; Start: Integer; 
                              DataLen: Integer; const DataBlockStr: WideString; 
                              const defChar: WideString); dispid 1610809485;
    function GetDataChar(const sVID: WideString; const sPWD: WideString; Index: Integer): WideString; dispid 208;
    procedure SetDataChar(const sVID: WideString; const sPWD: WideString; Index: Integer; 
                          const DataChar: WideString); dispid 209;
    function GetDataByte(const sVID: WideString; const sPWD: WideString; Address: Integer): Byte; dispid 1610809486;
    procedure SetDataByte(const sVID: WideString; const sPWD: WideString; Address: Integer; 
                          DataByte: Byte); dispid 1610809487;
    function GetDataHEXBlock(const sVID: WideString; const sPWD: WideString; Start: Integer; 
                             DataLen: Integer): WideString; dispid 223;
    procedure SetDataHEXBlock(const sVID: WideString; const sPWD: WideString; Start: Integer; 
                              DataLen: Integer; const DataHEXBlock: WideString); dispid 224;
    function GetDecryption(const sVID: WideString; const sPWD: WideString; 
                           const sCData: WideString; Repetition: Integer): WideString; dispid 1610809488;
    function GetEncryption(const sVID: WideString; const sPWD: WideString; 
                           const sPData: WideString; Repetition: Integer): WideString; dispid 1610809489;
    function GetPID(const sVID: WideString; const sPWD: WideString): WideString; dispid 204;
    function GetNET: Integer; dispid 205;
    function GetTimerCounter: Integer; dispid 206;
    procedure Activate(const Code: WideString); dispid 207;
    procedure DecreaseCounter; dispid 210;
    function ConvStringToDelimiteredString(const strCnv: WideString; ALen: Integer; 
                                           const DSep: WideString): WideString; dispid 1610809494;
    function ConvDelimiteredStringToString(const strDCnv: WideString; ALen: Integer; 
                                           const DSep: WideString): WideString; dispid 1610809495;
    function ConvStringToHEXString(const strCnv: WideString; ALen: Integer; const HSep: WideString): WideString; dispid 219;
    function ConvHEXStringToString(const strHCnv: WideString; ALen: Integer): WideString; dispid 220;
    function ConvDelimiteredStringToHEXString(const strDCnv: WideString; ALen: Integer; 
                                              const DSep: WideString; const HSep: WideString): WideString; dispid 221;
    function ConvHEXStringToDelimiteredString(const strHCnv: WideString; ALen: Integer; 
                                              const DSep: WideString): WideString; dispid 222;
    property ErrNo: Integer readonly dispid 201;
    property ErrDescr: WideString readonly dispid 202;
    property ErrDescrFA: WideString readonly dispid 238;
    property DeviceName: WideString readonly dispid 230;
    property DeviceVer: WideString readonly dispid 231;
    property DeviceSerial: WideString readonly dispid 232;
    property SelectedName: WideString readonly dispid 233;
    property SelectedVer: WideString readonly dispid 234;
    property SelectedSerial: WideString readonly dispid 235;
    procedure Login(const Username: WideString; const Password: WideString); dispid 211;
    procedure Logout; dispid 213;
    property Host: WideString dispid 214;
    property Port: Integer dispid 215;
    procedure init; dispid 216;
    property PSK: WideString writeonly dispid 217;
  end;

// *********************************************************************//
// The Class CoWSshell provides a Create and CreateRemote method to          
// create instances of the default interface _WSshell exposed by              
// the CoClass WSshell. The functions are intended to be used by             
// clients wishing to automate the CoClass objects exposed by the         
// server of this typelibrary.                                            
// *********************************************************************//
  CoWSshell = class
    class function Create: _WSshell;
    class function CreateRemote(const MachineName: string): _WSshell;
  end;

implementation

uses System.Win.ComObj;

class function CoWSshell.Create: _WSshell;
begin
  Result := CreateComObject(CLASS_WSshell) as _WSshell;
end;

class function CoWSshell.CreateRemote(const MachineName: string): _WSshell;
begin
  Result := CreateRemoteComObject(MachineName, CLASS_WSshell) as _WSshell;
end;

end.
